package springboot.springboot06_ssmp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import springboot.springboot06_ssmp.entity.User;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author daiqiang
 * @since 2024-06-24
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {
    public List<String> getUsernameByUserID(Integer  userID);

   @Select("select user_name, pass_word from  user where user_name=#{userName} and pass_word=#{passWord}")
        //Account getUsernameAndPassword(Account  account);   //20231212
    User getUsernameAndPassword(@Param("userName") String user_name, @Param("passWord") String pass_word);
}
